﻿<UserControl x:Class="Rotempco.ORM.Generator.TableWizard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:VM="clr-namespace:Rotempco.ORM.Generator.ViewModels"
             xmlns:Enum="clr-namespace:Rotempco.ORM.Generator.Enums"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:Toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ObjectDataProvider x:Key="vmColumns" ObjectType="{x:Type VM:VMColumns}" MethodName="GetInstance" />
            <ObjectDataProvider x:Key="MyEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
                <ObjectDataProvider.MethodParameters>
                    <x:Type TypeName="Enum:EncryptionTypeEnum" />
                </ObjectDataProvider.MethodParameters>
            </ObjectDataProvider>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Toolkit:DataGrid  AutoGenerateColumns="False" MinHeight="280" Margin="12,46,12,0" Name="dataGrid_ColumtList" VerticalAlignment="Stretch" ItemsSource="{Binding Source={StaticResource vmColumns},Path=Columns}" MouseDoubleClick="dataGrid_ColumtList_MouseDoubleClick" Height="450">
            <Toolkit:DataGrid.Columns>
                <Toolkit:DataGridCheckBoxColumn Header="PrimaryKeyFlag" Binding="{Binding PrimaryKey}" IsReadOnly="True" />
                <Toolkit:DataGridTextColumn Header="Name" Binding="{Binding Name}" IsReadOnly="True" />
                <Toolkit:DataGridComboBoxColumn Header="Encrypted" SelectedItemBinding="{Binding EncryptionType}" IsReadOnly="False" ItemsSource="{Binding Source={StaticResource MyEnum}}"/>
                <Toolkit:DataGridTextColumn Header="Encrypted Datatype" Binding="{Binding EncryptedDataType}" IsReadOnly="False" />
                <Toolkit:DataGridCheckBoxColumn Header="DeletedFlag" Binding="{Binding DeletedFlag}" IsReadOnly="False" />
                <Toolkit:DataGridCheckBoxColumn Header="IsEnum" Binding="{Binding IsEnum}" IsReadOnly="False" />
                <Toolkit:DataGridTextColumn Header="EnumName" Binding="{Binding EnumName}" IsReadOnly="True" />
                <Toolkit:DataGridCheckBoxColumn Header="IsSerializable" Binding="{Binding IsSerializable}" x:Name="IsSerializable" IsReadOnly="False" />
                <Toolkit:DataGridTextColumn Header="Serializable Object Name" Binding="{Binding SerializableName}" x:Name="SerializableName" IsReadOnly="True" />
            </Toolkit:DataGrid.Columns>
            <Toolkit:DataGrid.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Setup enum" Name="menuItem_SetupEnum" Click="menuItem_SetupEnum_Click" />
                    <MenuItem Header="Setup Serializable object" Name="menuItem_SetupSerializableObject" Click="menuItem_SetupSerializableObject_Click" />
                </ContextMenu>
            </Toolkit:DataGrid.ContextMenu>
        </Toolkit:DataGrid>
        <Label Content="Confirm Columns" Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="label1" VerticalAlignment="Top" />
        <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,17,12,0" Name="comboBox_ADALType" VerticalAlignment="Top" Width="120" SelectedIndex="0" SelectedValue="ADAL">
            <ComboBoxItem Content="ADAL" />
            <ComboBoxItem Content="ADALAudit" />
            <ComboBoxItem Content="ADALReadOnly" />
        </ComboBox>
        <Label Content="ADAL Type:" Height="28" HorizontalAlignment="Right" Margin="0,15,138,0" Name="label2" VerticalAlignment="Top" />
        <Label Content="" Height="28" HorizontalAlignment="Left" Margin="120,12,0,0" Name="label_TableName" VerticalAlignment="Top" />
        <Button Content="Back" Height="23" HorizontalAlignment="Right" Margin="0,0,93,12" Name="button_Back" Click="button_Back_Click" VerticalAlignment="Bottom" Width="75" />
        <Button Content="Next" Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="button_Next" VerticalAlignment="Bottom" Width="75" Click="button_Next_Click" />
        <Button Content="Back to table selection" Height="23" HorizontalAlignment="Right" Margin="0,0,645,12" Name="button_BackToTableSelection" VerticalAlignment="Bottom" Width="143" Click="button_BackToTableSelection_Click" />
    </Grid>
</UserControl>
